package web;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import service.UserService;

public class UserController {
    public static void main(String[] args) {

        ApplicationContext ioc = new ClassPathXmlApplicationContext("spring-advice.xml");

        UserService userService = ioc.getBean(UserService.class);

        userService.findAll();
        userService.findById(1);
        int delete = userService.delete(2);
        System.out.println(delete);
    }
}
